<template>
  <div id="app">
    <!--<img src="./assets/logo.png">-->
    <!--<hello></hello>-->

    <v-header v-bind:seller="seller"></v-header>
    <div class="tab">
      <div class="tab-item">
        <router-link to="goods" class="linking">商品</router-link>
      </div>
      <div class="tab-item">
        <router-link to="ratings" class="linking">评论</router-link>
      </div>
      <div class="tab-item">
        <router-link to="seller" class="linking">商家</router-link>
      </div>
    </div>
    <router-view :seller="seller"></router-view>
  </div>
</template>

<script type="text/ecmascript-6">
import header from './components/header/header.vue'
const ERR_OK = 0
export default {
  name: 'app',
  components: {
    'v-header': header
  },
  created() {
    this.$http.get('/api/seller').then(response => {
      response = response.body
      if (response.errno === ERR_OK) {
        this.seller = response.data
        console.log(this.seller)
      }
    })
  },
  data() {
    return {
      seller: {}
    }
  }
}
</script>

<style lang="stylus" rel="stylesheet/stylus">
 #app .tab{
  display: flex;
  width:100%;
  height:40px;
  line-height: 40px;
}
 #app .tab .tab-item{
  flex: 1;
  text-align: center;
   border-bottom: rgba(7,17,27,0.67) 1px solid;

}
 #app .tab .tab-item .linking{
   display: block;
   font-size: 14px;
   color: rgba(22,0,0,0.98)
 }
 #app .tab .tab-item :active{
   color: rgba(255, 0, 0, 0.98);
 }

</style>
